<!-- template inhertance -->
<extend name="layout/default"/>

<!-- styles -->
<block name="linkcss">
    <link rel="stylesheet" href="/Public/webuploader/css/webuploader.css">
    <link rel="stylesheet" href="/Public/simditor-2.3.23/styles/simditor.css">
    <link rel="stylesheet" href="/Public/simditor-emoji/styles/simditor-emoji.css">
    <!--日期-->
    <link rel="stylesheet" href="/Public/home/css/bootstrap-datetimepicker.min.css">
    <!--layui v2.4.5-->
    <link rel="stylesheet" href="/Public/layui-v2.4.5/css/layui.css">
    <!--layui第三方-->
    <link rel="stylesheet" href="/Public/layui-formSelects/dist/formSelects-v4.css">
    <!--element-->
    <link rel="stylesheet" href="/Public/vue/element-ui.min.css">

    <link rel="stylesheet" href="/Public/home/css/bbs/voteCreate.css">
</block>

<!-- scripts -->
<block name="linkjs">
    <script src="/Public/webuploader/js/webuploader.js"></script>
    <script src="/Public/simditor-2.3.23/site/assets/scripts/module.js"></script>
    <script src="/Public/simditor-2.3.23/site/assets/scripts/hotkeys.js"></script>
    <script src="/Public/simditor-2.3.23/site/assets/scripts/uploader.js"></script>
    <script src="/Public/simditor-2.3.23/site/assets/scripts/simditor.js"></script>
    <script src="/Public/simditor-emoji/lib/simditor-emoji.js"></script>
    <!--日期-->
    <script src="/Public/home/js/bootstrap-datetimepicker.js"></script>
    <script src="/Public/home/js/bootstrap-datetimepicker.zh-CN.js"></script>
    <!--layui v2.4.5-->
    <script src="/Public/layui-v2.4.5/layui.js"></script>
    <!--element-->
    <script src="/Public/vue/vue.min.js"></script>
    <script src="/Public/vue/element-ui.min.js"></script>

    <script src="/Public/home/js/bbs/voteCreate.js"></script>
</block>

<!-- page title -->
<block name="webtitle">
    <title>发起投票</title>
</block>

<!-- navagations -->
<block name="breadcrumb">
    <ol class="breadcrumb breadcrumb-edit">
        <li><a href="/">BBS</a></li>
        <li class="active">发起投票</li>
    </ol>
</block>

<!-- main body -->
<block name="content">
    <div class="publish-box">
        <div class="panel panel-default">
            <div class="panel-body p-30">
                <form class="layui-form" action="">
                    <div class="row">
                        <div class=" col-md-3">
                            <select name="theme" lay-verify="required">
                                <option value="">版块分类</option>
                                <option value="1">技术分享</option>
                                <option value="2">好文分享</option>
                                <option value="3">出差见闻</option>
                                <option value="4">市场见闻</option>
                                <option value="5">团建活动</option>
                                <option value="6">闲言碎语</option>
                            </select>
                        </div>
                        <div class=" col-md-9">
                            <input type="text" name="title" lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="mt-20">
                        <!--内容编辑框-->
                        <textarea id="editor" name="content" placeholder="在此发表您的投票详细内容...."></textarea>
                    </div>

                    <!--投票内容-->
                    <div class="mt-20 vote pt-5">
                        <div class="layui-form-item">
                            <label class="layui-form-label">投票方式：</label>
                            <div class="layui-input-inline ml-10">
                                <input type="radio" name="choice" title="单选" value="单选" lay-filter="choice">
                                <input type="radio" name="choice" title="多选" value="多选" lay-filter="choice">
                            </div>
                            <input type="text" class="layui-input layui-input-num" placeholder="在此输入允许用户最多选几项">
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">能否重选：</label>
                            <div class="layui-input-inline ml-10">
                                <input type="radio" name="can" title="能&nbsp;&nbsp;&nbsp;&nbsp;" value="能" >
                                <input type="radio" name="can" title="不能" value="不能" >
                            </div>
                            <div class="layui-form-mid layui-word-aux">设定用户投票后能否取消重新选择投票</div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">是否匿名：</label>
                            <div class="layui-input-inline ml-10">
                                <input type="radio" name="noname" title="匿名" value="匿名" >
                                <input type="radio" name="noname" title="实名" value="实名" >
                            </div>
                            <div class="layui-form-mid layui-word-aux">设定参与投票的用户是匿名投票还是实名投票</div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">截止时间：</label>
                            <div class="layui-input-inline ml-10">
                                <input type="text" name="end" class="layui-input" id="date-end" lay-verify="required" readonly="" placeholder="截止时间">
                            </div>
                        </div>

                        <div class="layui-form-item vote-content">
                            <label class="layui-form-label">投票选项：</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input layui-input-vote" name="vote-content1" placeholder="在此输入该选项内容..." lay-verify="required">
                            </div>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input layui-input-vote" name="vote-content2" placeholder="在此输入该选项内容..." lay-verify="required">
                                <button type="button" class="layui-btn layui-btn-primary" data-action="add" title="增加选项">
                                    <i class="icon-plus"></i>
                                </button>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">投票结果：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="see" title="投票后可见" value="after" >
                                <input type="radio" name="see" title="任何人可见" value="before" >
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">显示位置：</label>
                            <div class="layui-input-inline ml-10">
                                <input type="radio" name="position" title="顶部" value="top" >
                                <input type="radio" name="position" title="底部" value="bottom" >
                            </div>
                            <div class="layui-form-mid layui-word-aux">设定投票操作框在帖子内容的顶部还是底部</div>
                        </div>


                        <!--输入框-->
                        <div class="layui-form-item" style="position: relative">
                            <label class="layui-form-label">参与成员：</label>
                            <div class="layui-input-block layui-tree-select">
                                <input type="text" name="user_group" id="user_group" placeholder="请选择" readonly="" class="layui-input">
                                <i class="select-icon"></i>
                            </div>

                            <!--树形结构-->
                            <div class="tree layui-input-block">
                                <!--搜索框-->
                                <el-input
                                        placeholder="请搜索"
                                        v-model="searchText">
                                </el-input>
                                <!--树-->
                                <el-tree
                                        show-checkbox
                                        :data="data"
                                        node-key="id"
                                        :props="defaultProps"
                                        highlight-current
                                        ref="tree"
                                        :filter-node-method="searchNode"
                                        @check="getCheckClick">
                                </el-tree>
                            </div>

                        </div>


                        <div class="layui-form-item vote-show">
                            <label class="layui-form-label">展示模板：</label>
                            <div class="layui-input-block model" data-model="1">
                                <p>模板1:</p>
                                <div class="mt-10">
                                    <div class="option">选项1<span>（2人）</span></div>
                                    <div class="layui-progress layui-progress-big" lay-showPercent="true">
                                        <div class="layui-progress-bar layui-bg-green"></div> <!-- lay-percent后台计算所得 -->
                                    </div>
                                </div>
                                <div class="mt-10">
                                    <div class="option">选项2<span>（5人）</span></div>
                                    <div class="layui-progress layui-progress-big" lay-showPercent="true">
                                        <div class="layui-progress-bar layui-bg-green"></div>
                                    </div>
                                </div>
                                <div class="mt-10">
                                    <div class="option">选项3<span>（1人）</span></div>
                                    <div class="layui-progress layui-progress-big" lay-showPercent="true">
                                        <div class="layui-progress-bar layui-bg-green"></div>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-input-block model" data-model="2">
                                <p>模板2:</p>
                                <div class="layui-inline" style="border: 1px solid #e6e6e6">
                                    <div class="options p-20" >选项1</div>
                                    <div class="count p-20">2人</div>
                                </div>
                                <div class="layui-inline active" style="border: 1px solid #e6e6e6">
                                    <div class="options p-20" >选项2</div>
                                    <div class="count p-20">5人</div>
                                </div>
                                <div class="layui-inline" style="border: 1px solid #e6e6e6">
                                    <div class="options p-20" >选项3</div>
                                    <div class="count p-20">1人</div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!--上传附件-->
                    <div class="mt-20">
                        <button type="button" class="layui-btn layui-btn-primary" id="upload">上传附件</button>
                    </div>
                    <!--<div class="mt-20">
                        <div id="filePicker" class="webuploader-container"><div class="webuploader-pick"><i class="icon-arrow-up"></i> 上传附件</div><div id="rt_rt_1dbugk06t1dp21ate1cng1dcjg1b1" style="position: absolute; top: 0px; left: 0px; width: 104.891px; height: 42px; overflow: hidden; bottom: auto; right: auto;"><input type="file" name="file" class="webuploader-element-invisible" multiple="multiple" accept=""><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></div>
                        <div class="uploader-file-queue"></div>
                    </div>-->

                    <button class="btn btn-primary mt-20" lay-submit="" type="button" style="width: 105px;height: 40px;" lay-filter="publish">立即发表</button>
                </form>
            </div>
        </div>
    </div>
</block>